<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
</head>
<body>
  <script>
    // bind方法
    function demo() {
      console.log(this)
    }

    demo()

    const x = demo.bind({a: 1, b:2})
    console.log(x)

    // 结构赋值
    let obj = {a:{b:{c:1}}}
    let obj2 = {a:{b:1}}

    console.log(obj.a.b.c)

    const {a:{b:{c}}} = obj
    console.log(c)

    const {a:{b:data}} = obj2
    console.log(data);
  </script>
</body>
</html>